package cn.liontalk.StrategyPattern.demo2;

public class WashingFactory {

    public static WashingStrategy getWashingStrategy(String washingType) {
        if ("Quick".equals(washingType)) {
            return new QuickWashingStrategy();
        }
        if ("BigClothes".equals(washingType)) {
            return new BigClothesWashingStrategy();
        }
        if ("Soft".equals(washingType)) {
            return new SoftWashingStrategy();
        }
        return new StandardWashingStrategy();
    }
}
